Many applications, such as remote access software and screen recording software, encode the contents of a computer screen in real-time. These applications typically encode the graphical contents comprising the displayed image as compactly as possible to account for possible bandwidth and storage constraints. Screen contents can represented as graphical content; multimedia content; update images or a sequence of images. These screen contents can be obtained by an encoder any number of ways including executing an application, or accessing a stored file.
The size of an image or a sequence of images can be substantially reduced by data compression. Some compression techniques include compressing portions of an image while others include compressing entire images. These techniques often do not take into account the repetitive nature of graphics or the likelihood that sections of an image can be common to any number of images. One efficient form of data compression takes advantage of the often repetitive nature of images by identifying blocks of pixels within an image that are the same as stored blocks of pixels. Each section having a matching stored section is tagged with a pointer that points to the stored section. The efficiency of this form of data compression highlights the need for a method and apparatus that quickly detects blocks in an image that also occur verbatim in a reference image, without regard to whether the location of the block is the same in both the reference and new image.